package cn.tutou.tw.ck.jdbc;

import java.sql.*;
import java.util.Set;

public class AppjdbcInsert {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        String url = "jdbc:mysql://localhost:3306/test?useSSl=false";
        String username = "root";
        String password = "root";
        Connection connection = DriverManager.getConnection(url, username, password);
        Statement statement = connection.createStatement();
        String sql = "INSERT INTO `test1` (`username`,`password`) VALUES ('xy',MD5('678'))";
        int i = statement.executeUpdate(sql);
        if(i>0){
            System.out.println("插入成功");
        }

    }
}



